rows= [
  {
    id: 1,
    goodsName: "普通木箱",
    goodsSize: "500*400*300",
  },
    {
    id: 2,
    goodsName: "普通木箱",
    goodsSize: "500*400*300",
  },
  {
    id: 3,
    goodsName: "普通木箱",
    goodsSize: "500*400*300",
  },
  {
    id: 4,
    goodsName: "普通木箱",
    goodsSize: "500*400*300",
  },
];

rows[0].id=5


rows.splice(2, 1)
console.log(rows);

console.log("-------------------------------------");


function a (){
 rows.forEach((row,arr,index) => {
    console.log("i===",index);
     row.id=index+1
    console.log(index);
  });
  console.log("------------ss-------------");
  console.log(rows);
}

a()




